﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AuthenticationSection;

namespace AuthenticationDemo
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            HttpCustomResponse.GetInstance.response = Response;
            HttpCustomResponse.GetInstance.request = Request;
            var logOn = Authentication.GetInstance.LogOn("admin", "000000");
            //if (logOn != null)
            //    Response.Cookies.Add(logOn);
            Authentication.GetInstance.LogOut();
            var changePwd = Authentication.GetInstance.ChangePassWord("admin", "111111");
            Response.Redirect("Default.aspx", false);
        }
    }
}